<template>
	<view class="navList">
		<view class="item" v-for="(item, index) in arr" @click="nav(index)">
			<divimg class="img" :src="item.icon" mode="scaleToFill"></divimg>
			<view class="text">
				{{ item.text }}
			</view>
		</view>
	</view>
</template>

<script>
	import { underDevelopment } from '@/utils/utils.js';
	export default {
		name: 'navList',
		data() {
			return {
				arr: [
					{
						icon: '/static/images/index/joiningAMember.png',
						text: '加入会员',
					},
					{
						icon: '/static/images/index/networkCircle.png',
						text: '人脉圈',
					},
					// {
					// 	icon: '/static/images/index/wubaoExhibition.png',
					// 	text: '创四方展',
					// },
					{
						icon: '/static/images/index/overseasExhibitions.png',
						text: '推荐产品',
					},
					{
						icon: '/static/images/index/industryConferences.png',
						text: '热门活动',
					},
					// {
					// 	icon: '/static/images/index/futureLearningSociety.png',
					// 	text: '未来学社',
					// },
				],
			};
		},
		methods: {
			nav(index) {
				switch (index) {
					case 0:
						uni.navigateTo({
							url: '/pages/index/vip/vip',
						});
						break;
					case 1:
						uni.switchTab({
							url: '/pages/group/group',
						});
						break;
					case 2:
						uni.switchTab({
							url: '/pages/product/product',
						});
						break;
					case 3:
						uni.switchTab({
							url: '/pages/activity/activity',
						});
						break;
					default:
						underDevelopment();
						break;
				}
			},
		},
	};
</script>

<style lang="scss" scoped>
	.navList {
		background: #ffffff;
		border-radius: 20rpx;
		margin: 30rpx auto 20rpx;
		width: $connet-width;
		display: flex;
		height: 170rpx;
		justify-content: space-around;

		.item {
			display: flex;
			justify-content: space-evenly;
			flex-direction: column;
			align-items: center;
			.img {
				width: 80rpx;
				height: 80rpx;
				margin: 0 auto;
			}

			.text {
				font-size: $uni-font-size-12;
				font-weight: bold;
			}
		}
	}
</style>
